/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/1/10
 * Time:9:37
 **/

/*class Person{
    public String name;
    public int age;
    public static int a;

    public void eat() {
        System.out.println("实例成员方法:吃饭");
    }
    public void sleep() {
        System.out.println("实例成员方法:睡觉");
    }
    public static void func() {
        System.out.println("静态成员方法:func()");
    }
}*/

/*class Student{

    private String name1;
    private int age;
    static int count;

    public String getName(){
        return name1;
    }

    public void setName(String name1) {
        this.name1 = name1;
    }

    public String getName1() {
        return name1;
    }

    public void setName1(String name1) {
        this.name1 = name1;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name1 + '\'' +
                ", age=" + age +
                '}';
    }

    private void func(){
        System.out.println("func()");
    }
    public void func2(){
        func();
    }

    public Student(){
        //this("jubai",18);
        System.out.println("调用不带参数的构造方法");
    }
    public Student(String name1){
        this.name1 = name1;
        System.out.println("调用带一个 String 参数的构造方法");
    }
    public Student(String name1,int age){
        this.name1 = name1;
        this.age = age;
        System.out.println("调用带一个 String 参数和一个 int 参数的构造方法");
    }


    static {
        count = 10;//静态代码块只能写静态变量
        System.out.println("静态代码块");
    }

    {
        this.name1 = "jubai";
        this.age = 18;
        System.out.println("实例代码块");
    }
}*/

public class Main {
    public static void main(String[] args) {

        /*Student student1 = new Student();
        System.out.println(student1);

        Student student2 = new Student();
        System.out.println(student2);
        }*/
        /*int a = 10;
        {
            //本地代码块、定义在方法内部的代码块
            //int a = 10;
            System.out.println(a);
        }
        System.out.println(a);
        }*/
        /*Student student1 = new Student();
            System.out.println(student1);*/
        /*Student student2 = new Student("jubai");
        System.out.println(student2);
        Student student3 = new Student("jubai",18);
        System.out.println(student3);*/

        /*Student student = new Student();
        student.setName1("jubai");
        System.out.println(student.getName1());
        student.func2();*/

    /*public static void main(String[] args) {
        Person person = new Person();
        person.name = "jubai";
        person.age = 18;
        System.out.println(person.name);
        System.out.println(person.age);

        Person.a = 10;
        System.out.println(Person.a);
        Person.func();
    }*/
    }